<template>
	<div>
		<el-dialog :title="'多条件'+ctype+'自定义详情'" :visible.sync="dialogFlag" width="60%" :before-close="hide">
			<el-row>
				<el-col :span="12">
					<el-col :span="6">
						<div class="name">门诊科室</div>
					</el-col>
					<el-col :span="18">
						<div class="val">{{nowData.mzks}}</div>
					</el-col>
				</el-col>
				<el-col :span="12">
					<el-col :span="6">
						<div class="name">急诊科室</div>
					</el-col>
					<el-col :span="18">
						<div class="val">{{nowData.jzks}}</div>
					</el-col>
				</el-col>
				<el-col :span="12">
					<el-col :span="6">
						<div class="name">住院科室</div>
					</el-col>
					<el-col :span="18">
						<div class="val">{{nowData.zyks}}</div>
					</el-col>
				</el-col>
				<el-col :span="12">
					<el-col :span="6">
						<div class="name">医生</div>
					</el-col>
					<el-col :span="18">
						<div class="val">{{nowData.ys}}</div>
					</el-col>
				</el-col>
				<el-col :span="12">
					<el-col :span="6">
						<div class="name">医保病人</div>
					</el-col>
					<el-col :span="18">
						<div class="val">{{nowData.ybbr}}</div>
					</el-col>
				</el-col>
				<el-col :span="12">
					<el-col :span="6">
						<div class="name">军人</div>
					</el-col>
					<el-col :span="18">
						<div class="val">{{nowData.jr}}</div>
					</el-col>
				</el-col>
				<el-col :span="12">
					<el-col :span="6">
						<div class="name">就诊卡号</div>
					</el-col>
					<el-col :span="18">
						<div class="val">{{nowData.jzkh}}</div>
					</el-col>
				</el-col>
				<el-col :span="12">
					<el-col :span="6">
						<div class="name">性别</div>
					</el-col>
					<el-col :span="18">
						<div class="val">{{nowData.sex_txt}}</div>
					</el-col>
				</el-col>
				<el-col :span="12">
					<el-col :span="6">
						<div class="name">身高</div>
					</el-col>
					<el-col :span="18">
						<div class="val">{{nowData.sg_txt}}</div>
					</el-col>
				</el-col>
				<el-col :span="12">
					<el-col :span="6">
						<div class="name">体重</div>
					</el-col>
					<el-col :span="18">
						<div class="val">{{nowData.weight_txt}}</div>
					</el-col>
				</el-col>
				<el-col :span="12">
					<el-col :span="6">
						<div class="name">年龄</div>
					</el-col>
					<el-col :span="18">
						<div class="val">{{nowData.age_txt}}</div>
					</el-col>
				</el-col>
				<el-col :span="12">
					<el-col :span="6">
						<div class="name">诊断</div>
					</el-col>
					<el-col :span="18">
						<div class="val">{{nowData.zd}}</div>
					</el-col>
				</el-col>
				<el-col :span="12">
					<el-col :span="6">
						<div class="name">妊娠</div>
					</el-col>
					<el-col :span="18">
						<div class="val">{{nowData.rs_txt}}</div>
					</el-col>
				</el-col>
				<el-col :span="12">
					<el-col :span="6">
						<div class="name">肾损</div>
					</el-col>
					<el-col :span="18">
						<div class="val">{{nowData.ss_txt}}</div>
					</el-col>
				</el-col>
				<el-col :span="12">
					<el-col :span="6">
						<div class="name">肝损</div>
					</el-col>
					<el-col :span="18">
						<div class="val">{{nowData.gs_txt}}</div>
					</el-col>
				</el-col>
				<el-col :span="12">
					<el-col :span="6">
						<div class="name">过敏源</div>
					</el-col>
					<el-col :span="18">
						<div class="val">{{nowData.gmy}}</div>
					</el-col>
				</el-col>
				<el-col :span="12">
					<el-col :span="6">
						<div class="name">手术</div>
					</el-col>
					<el-col :span="18">
						<div class="val">{{nowData.ss}}</div>
					</el-col>
				</el-col>
				<el-col :span="12">
					<el-col :span="6">
						<div class="name">检验</div>
					</el-col>
					<el-col :span="18">
						<div class="val">{{nowData.jy_name}}</div>
					</el-col>
				</el-col>
				<el-col :span="12">
					<el-col :span="6">
						<div class="name" style="border:0;">给药途径</div>
					</el-col>
					<el-col :span="18">
						<div class="val" style="border:0;">{{nowData.gytj}}</div>
					</el-col>
				</el-col>
			</el-row>
			<span slot="footer" class="dialog-footer">
				<el-button @click="sureFun" type="primary">确 认</el-button>
				<el-button @click="dialogFlag = false">关 闭</el-button>
			</span>
		</el-dialog>
	</div>
</template>

<script>
	export default {
		name:"LookMultiInfo",
		props:{
			dataObj:{
				require:true
			},
			ctype:{
				require:true
			}
		},
		watch:{
			dataObj(val){
				//门诊科室
				var mzks=[];
				for(var i=0;i<val.ksdm_mzList.length;i++){
					mzks.push(val.ksdm_mzList[i].ksmc);
				}
				val.mzks=mzks.join("|");
				//急诊科室
				var jzks=[]
				for(var i=0;i<val.ksdm_jzList.length;i++){
					jzks.push(val.ksdm_jzList[i].ksmc);
				}
				val.jzks=jzks.join("|");
				//住院科室
				var zyks=[]
				for(var i=0;i<val.ksdm_zyList.length;i++){
					zyks.push(val.ksdm_zyList[i].ksmc);
				}
				val.zyks=zyks.join("|");
				//医生
				var ys=[]
				for(var i=0;i<val.doctorList.length;i++){
					ys.push(val.doctorList[i].ysmc);
				}
				val.ys=ys.join("|");
				//诊断
				var zd=[]
				for(var i=0;i<val.diseaseList.length;i++){
					zd.push(val.diseaseList[i].zdmc);
				}
				val.zd=zd.join("|");
				//过敏原
				var gmy=[]
				for(var i=0;i<val.allergenList.length;i++){
					gmy.push(val.allergenList[i].gmymc);
				}
				val.gmy=gmy.join("|");
				//手术
				var ss=[]
				for(var i=0;i<val.operationList.length;i++){
					ss.push(val.operationList[i].ssmc);
				}
				val.ss=ss.join("|");
				// //诊断
				// var zd=[]
				// for(var i=0;i<val.diseaseList.length;i++){
				// 	zd.push(val.diseaseList[i].zdmc);
				// }
				// val.zd=zd.join("|");
				//给药途径
				var gytj=[]
				for(var i=0;i<val.routeList.length;i++){
					gytj.push(val.routeList[i].gyfsmc);
				}
				val.gytj=gytj.join("|");
				
				
				this.nowData=val;
			}
		},
		data () {
			return {
				dialogFlag : false,
				nowData:{}
			}
		},
		methods:{
			show () {
				this.dialogFlag = true;
			},
			hide () {
				this.dialogFlag = false;
			},
			sureFun () {
				this.dialogFlag = false;
			}
		}
	}
</script>

<style lang="scss" scoped>
	.name,.val{
		height:40px;
		line-height:40px;
		font-size:12px;
		border-bottom:1px solid #b3d8ff;
	}
	.name{
		text-align:right;
		background:#ecf5ff;
		padding-right:5px;
	}
	.val{
		padding-left:5px;
	}
</style>
